function [  ] = read( this, fileName, delimiter )
%READ Summary of this function goes here
%   Detailed explanation goes here
% DataSet::

[filePathStr, fileTrunkName, fileExtensionName] = fileparts(fileName);

switch lower(fileExtensionName)
    case '.arff'
%         keyboard
        if exist([filePathStr, '/', [fileTrunkName, '.xml']], 'file')
            xDoc = xmlread([filePathStr, '/', [fileTrunkName, '.xml']]);
            nLabel = xDoc.getElementsByTagName('label').getLength;
        elseif exist([filePathStr, '/', [this.name, '.xml']], 'file')
            xDoc = xmlread([filePathStr, '/', [this.name, '.xml']]);
            nLabel = xDoc.getElementsByTagName('label').getLength;
        end
        dm = DataMatrix();
        dm.read(fileName);
        dmX = dm{:, 1:(dm.nCol - nLabel)};
        dmY = dm{:, (dm.nCol - nLabel + 1):dm.nCol};
        dmY.toSignedLabelForm();
        this.dmX = dmX;
        this.dmY = dmY;
    otherwise
        error('BatErr: Unsupported file type');
end

end

